#! /bin/sh
# post-installation script for afrimesh-dashboard
#
# see: dh_installdeb(1)

set -e

case "$1" in
    configure)
        # setup permissions so that uci can edit configs from the httpd process
        chown -R :www-data /etc/config
        chmod 0775 /etc/config
        chmod -R 0664 /etc/config/afrimesh
        chmod -R 0664 /etc/config/batmand
        # add www-data to adm group so that it can read the system log files
        adduser www-data adm
        # restart httpd to register change
        /etc/init.d/apache2 restart
     ;;
 
    abort-upgrade|abort-remove|abort-deconfigure)
 
    ;;
 
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
 
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
 
#DEBHELPER#
 
exit 0


